package(default_visibility = ["//visibility:public"])

load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")

exports_files([
    "system-config-tmpl.js",
    "system-rxjs-operators.js",
])

# Custom "tsc_wrapped" binary that has "tsickle" available as runtime dependency.
# This is needed as the default compiler for a "ts_library" does not have a dependency
# on "tsickle" by default.
nodejs_binary(
    name = "tsc_wrapped_with_tsickle",
    data = [
        "@npm//@bazel/typescript",
        "@npm//tsickle",
    ],
    entry_point = "@npm//:node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js",
    install_source_map_support = False,
)

# Workaround for https://github.com/bazelbuild/bazel-toolchains/issues/356. We need the
# "SYS_ADMIN" capability in order to run browsers with sandbox enabled.
platform(
    name = "rbe_platform",
    parents = ["@rbe_default//config:platform"],
    remote_execution_properties = """
      {PARENT_REMOTE_EXECUTION_PROPERTIES}
      properties: {
          name: "dockerAddCapabilities"
          value: "SYS_ADMIN"
      }
    """,
)

config_setting(
    name = "view_engine_mode",
    values = {
        "define": "angular_ivy_enabled=False",
    },
)
